"""
学员相关模式
"""
from pydantic import BaseModel
from typing import Optional
from .base import BaseSchema, TimestampMixin


class StudentBase(BaseModel):
    """学员基础模式"""
    name: str
    gender: str
    phone: str
    email: Optional[str] = None
    region_id: Optional[int] = None
    traffic_channel_id: Optional[int] = None
    source: Optional[str] = None
    province: Optional[str] = None


class StudentCreate(StudentBase):
    """创建学员"""
    pass


class StudentUpdate(BaseModel):
    """更新学员"""
    name: Optional[str] = None
    gender: Optional[str] = None
    phone: Optional[str] = None
    email: Optional[str] = None
    region_id: Optional[int] = None
    traffic_channel_id: Optional[int] = None
    source: Optional[str] = None
    province: Optional[str] = None
    status: Optional[str] = None


class StudentResponse(StudentBase, TimestampMixin, BaseSchema):
    """学员响应"""
    id: int
    status: str
